package com.climber.android.component.webview.di.component

import com.climber.android.component.webview.di.module.BaseWebModule
import com.climber.android.component.webview.mvp.contract.BaseWebContract
import com.climber.android.component.webview.mvp.ui.base.BaseWebActivity

import dagger.BindsInstance
import dagger.Component
import io.ganguo.library.mvp.ui.mvp.di.component.AppComponent
import io.ganguo.library.mvp.ui.mvp.di.scope.ActivityScope

/**
 * Created by Mikes at 2019/5/6 9:16 AM
 *
 * 展示 Component 的用法
 */
@ActivityScope
@Component(modules = [BaseWebModule::class], dependencies = [AppComponent::class])
interface BaseWebComponent {
    fun inject(activity: BaseWebActivity)

    @Component.Builder
    interface Builder {
        @BindsInstance
        fun view(view: BaseWebContract.View): BaseWebComponent.Builder

        fun appComponent(appComponent: AppComponent): BaseWebComponent.Builder
        fun build(): BaseWebComponent
    }
}
